package com.xatu.yl.storeshopping.util;

import android.graphics.Color;
import android.graphics.Typeface;
import android.support.v7.app.AppCompatActivity;
import android.widget.ImageButton;
import android.widget.TextView;


public class ChangeStateUtil extends AppCompatActivity {
    //设置为点击的状态
    public static void changeOk(TextView tv, float size, ImageButton imageButton){
        tv.setTextSize(size);
        tv.setTypeface(Typeface.DEFAULT_BOLD);
        tv.setTextColor(Color.BLACK);
        //设置按钮的选中状态
        imageButton.setSelected(true);
    }

    //设置为未点击的状态
    public static void changeNo(TextView tv,float size,ImageButton imageButton){
        tv.setTextSize(size);
        tv.setTypeface(Typeface.DEFAULT);
        tv.setTextColor(Color.GRAY);
        imageButton.setSelected(false);
    }


    //不同种类的状态
    public static void changeOk(TextView tv, float size){
        tv.setTextSize(size);
        tv.setTypeface(Typeface.DEFAULT_BOLD);
        tv.setTextColor(Color.BLACK);
        //设置按钮的选中状态
    }

    //设置为未点击的状态
    public static void changeNo(TextView tv,float size){
        tv.setTextSize(size);
        tv.setTypeface(Typeface.DEFAULT);
        tv.setTextColor(Color.GRAY);
    }
}
